import { CommonModal } from "@/views/components/CommonModal";
import Typography from "@/pages/OrderModule/common/components/Typography";
import { Button } from "antd";

import React from "react";

const ImportResultModal = React.memo(({ visible, handleExportFailed, handleCancel, result }) => {
	return (
		<CommonModal
			title={{ title: "导入结果" }}
			open={visible}
			width="530px"
			// okText="导出失败内容"
			// onOk={handleExportFailed}
			onCancel={handleCancel}
			footer={
				<>
					<Button onClick={handleCancel}>取消</Button>
					<Button onClick={handleExportFailed} disabled={result.failNum === 0} type="primary">
						导出失败内容
					</Button>
				</>
			}
		>
			<Typography>
				<span className="green">成功</span>
				导入{result.successNum}条，<span className="red">失败</span>
				{result.failNum}条
			</Typography>
		</CommonModal>
	);
});

export default ImportResultModal;
